import request from "@/utils/request";

// 订单列表
export function orderList(params) {
    return request({
        url: '/order/orderList',
        method: 'get',
        params
    })
}

// 删除订单
export function deleteById(id) {
    return request({
        url: `/order/delete/${id}`,
        method: 'delete',
    })
}

// 添加订单
export function addOrder(data) {
    return request({
        url: '/order/add',
        method: 'post',
        data
    })
}

// 修改订单信息
export function updateOrder(data) {
    return request({
        url: '/order/update',
        method: 'post',
        data
    })
}

// 根据 name、code 查询订单信息
export function search(params) {
    return request({
        url: '/order/search',
        method: 'get',
        params
    })
}
